/*********************************************************************
 * 						computer graphics
 * 							exercise 4
 * 					shaham fridenberg 039421268
 *                    danielle barda 304954654
 ********************************************************************/

public class Vector {
	public double x;
	public double y;
	public double z;
	
	public Vector(double x, double y, double z)
	{
		this.x = x;
		this.y = y;
		this.z = z;
	}
	
	public double len()
	{
		return Math.sqrt(x*x+y*y+z*z);
	}
	
	public Vector minus(Vector v)
	{
		return new Vector(this.x - v.x, this.y - v.y, this.z - v.z);
	}
	
	public double mul(Vector v)
	{
		return (this.x * v.x + this.y * v.y + this.z + v.z);
	}
	
	public void printVector()
	{
		System.out.println("("+x+", "+y+", "+z+")");
	}
	
}
